package GUILag;

import java.awt.BorderLayout;
import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.JTextField;
import javax.swing.SwingConstants;
import javax.swing.JButton;
import javax.swing.JLabel;
import com.jgoodies.forms.factories.DefaultComponentFactory;
import java.awt.Font;
import javax.swing.JTable;
import javax.swing.JList;
import java.awt.Color;
import javax.swing.JToolBar;
import javax.swing.JTree;
import javax.swing.tree.DefaultTreeModel;
import javax.swing.tree.DefaultMutableTreeNode;
import javax.swing.border.TitledBorder;

public class FindKundeGUI extends JFrame {

	private JPanel contentPane;
	private JTextField txtSgefelt;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					FindKundeGUI frame = new FindKundeGUI();
					frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the frame.
	 */
	public FindKundeGUI() {
		setTitle("Find kunde");
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(100, 100, 649, 411);
		contentPane = new JPanel();
		contentPane.setBackground(Color.LIGHT_GRAY);
		contentPane.setToolTipText("");
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		setContentPane(contentPane);
		contentPane.setLayout(null);
		
		txtSgefelt = new JTextField();
		txtSgefelt.setText("S\u00F8gefelt");
		txtSgefelt.setToolTipText("");
		txtSgefelt.setHorizontalAlignment(SwingConstants.CENTER);
		txtSgefelt.setBounds(163, 11, 358, 20);
		contentPane.add(txtSgefelt);
		txtSgefelt.setColumns(10);
		
		JButton btnSg = new JButton("S\u00F8g");
		btnSg.setBounds(531, 10, 92, 23);
		contentPane.add(btnSg);
		
		JList list = new JList();
		list.setBorder(new TitledBorder(null, "S\u00F8geresultater", TitledBorder.LEADING, TitledBorder.TOP, null, null));
		list.setBounds(163, 42, 460, 286);
		contentPane.add(list);
		
		JButton btnNste = new JButton("N\u00E6ste");
		btnNste.setBounds(534, 339, 89, 23);
		contentPane.add(btnNste);
		
		JTree tree = new JTree();
		tree.setBackground(Color.WHITE);
		tree.setModel(new DefaultTreeModel(
			new DefaultMutableTreeNode("Vestbjerg byggecenter A/S") {
				{
					add(new DefaultMutableTreeNode("Kassesalg"));
					add(new DefaultMutableTreeNode("Ordre"));
					add(new DefaultMutableTreeNode("Opret nyt medlem"));
					add(new DefaultMutableTreeNode("S\u00F8g efter medlem"));
				}
			}
		));
		tree.setBounds(0, 0, 153, 373);
		contentPane.add(tree);
	}
}
